<template>
  <div class="container_box">
    <Breadcrumb :items="['权限管理', '密钥管理']" />
    <ga-card class="content_card">
    <baseTable :api-url="apiBaseUrl" :columns="columnsSignature">
      <template #operatBtns>
        <ga-button type="primary" @click="handleBtn()">同步</ga-button>
      </template>
    </baseTable> 
    </ga-card>
    <createAndEditModal ref="createRef" @fetch-data="fetchData" />
  </div>
</template>

<script setup>
  import { ref, onMounted, reactive } from 'vue';
  import { columnsSignature } from '@/utils/column';
  import { Message } from '@garco-design/web-vue';
  import createAndEditModal from '../signature/components/createAndEditModal.vue';
  import baseTable from './index.vue'

  const apiBaseUrl = '/rbac/application/';
  const total = ref(0);
  const tableData = ref([]);
  const listQuery = reactive({
    page: 1,
    limit: 10,
    search: '',
  });
  // 列表
  const fetchData = async () => {
    // setLoading(true);
    // try {
    //   const { data, code } = await getBaseTableList('signature', listQuery);
    //   if (code === 20000) {
    //     tableData.value = data.items || [];
    //     total.value = data?.total;
    //   }
    // } catch (err) {
    //   console.log(err);
    // } finally {
    //   setLoading(false);
    // }
  };

  onMounted(() => {
    fetchData();
  });
</script>

<style lang="scss" scoped></style>
